package com.zyk.leetcode;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangsan
 * @date 2021/5/1 15:50
 */
public class C1622 {


    static class Fancy {

        public Fancy() {

        }

        public void append(int val) {

        }

        public void addAll(int inc) {

        }

        public void multAll(int m) {

        }

        public int getIndex(int idx) {
            return 0;
        }
    }

    static class Right {

        List<Long> elements;

        public Right() {
            elements = new ArrayList<>();
        }

        public void append(int val) {
            elements.add((long)val);
        }

        public void addAll(int inc) {
            for (int i = 0; i < elements.size(); i++) {
                elements.set(i, elements.get(i) + inc);
            }
        }

        public void multAll(int m) {
            for (int i = 0; i < elements.size(); i++) {
                elements.set(i, elements.get(i) * m);
            }
        }

        public int getIndex(int idx) {
            return idx >= elements.size() ? -1 : (int) (elements.get(idx) % 1000000007);
        }
    }

    // for test
    public static void main(String[] args) {
        System.out.println(Integer.MAX_VALUE);
    }

}
